<?php

class commonLoader{

	public $basedir  = null;

	public $includeDirs = array(
								'API',
								'Tools'
								'Util'
							);
	
    public function __construct($basedir){
        $this->basedir = $basedir;
    }
    
	public function setBaseDir($dir){
		$this->basedir = $dir;
	}
	
	public function importDir($dir)
	{
	//	return dirname(dirname(__FILE__)).'/yuekegu-common/'.$dir;
		return $this->basedir.'/../Libaray/'.$dir;
	}
	
	public function import(){

		$includeDirs = array_map(array('commonLoader','importDir'),$this->includeDirs);		
        
		
		set_include_path(get_include_path().PATH_SEPARATOR.implode(';', $includeDirs));	
	}
}

?>